import request from '@/utils/request'

export default {
    findBaseTrademarkByKeyword(keyword) {
        return request({
            url:`/admin/product/baseTrademark/findBaseTrademarkByKeyword/${keyword}`,
            method: 'GET',
        })
    },
    BaseTrademark(id) {
        return request.get(`/admin/product/baseTrademark/get/${id}`)
    },  
    getTrademarkList() {
        return request.get(`/admin/product/baseTrademark/getTrademarkList`)
    },
    findBaseTrademarkByTrademarkIdList(data) {
        return request({
            url: `/admin/product/baseTrademark/inner/findBaseTrademarkByTrademarkIdList`,
            method: 'POST',
            data
        })
    },
    deleteBaseTrademark(id) {
        return request.delete(`/admin/product/baseTrademark/remove/${id}`)
    },
    creatBaseTrademark(data) {
        return request({
            url: `/admin/product/baseTrademark/save`,
            method: 'POST',
            data
        })
    },
    changeBaseTrademark(data) {
        return request({
            url: `/admin/product/baseTrademark/update`,
            method: 'PUT',
            data
        })
    },
    categoryPage(page, limit) {
        return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
    },
    // 添加和修改
    addOrUpdateTrademark(trademarkInfo) {
        if (trademarkInfo.id) {
          // 修改
          return request.put(`/admin/product/baseTrademark/update`, trademarkInfo)
        } else {
          // 新增
          return request.post(`/admin/product/baseTrademark/save`, trademarkInfo)
        }
      }
}





















// GET /admin/product/baseTrademark/findBaseTrademarkByKeyword/{keyword}
// findBaseTrademarkByKeyword

// GET /admin/product/baseTrademark/get/{id}
// 获取BaseTrademark

// GET /admin/product/baseTrademark/getTrademarkList
// getTrademarkList

// POST /admin/product/baseTrademark/inner/findBaseTrademarkByTrademarkIdList
// findBaseTrademarkByTrademarkIdList

// DELETE /admin/product/baseTrademark/remove/{id}
// 删除BaseTrademark

// POST /admin/product/baseTrademark/save
// 新增BaseTrademark

// PUT /admin/product/baseTrademark/update
// 修改BaseTrademark

// GET /admin/product/baseTrademark/{page}/{limit}
// 分页列表

// [ base url: / , api version: 1.0 ]